package hibernate_advanced_apply.object_inherit_mapping.single_table.single_table_annotation.source;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;

/**
 * @author Administrator
 * @create 2019-01-06 13:38
 * @desc 老师子类持久化类(注解)
 **/
//标注实体类
@Entity
//添加该类的鉴别名为teacher,区别于student
@DiscriminatorValue("teacher")
public class Teacher extends Person{

    private int money;

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }
}
